package com.jkt.rms.validator;


import org.springframework.validation.Errors;
import org.springframework.validation.ValidationUtils;
import org.springframework.validation.Validator;
import com.jkt.rms.vo.SystemRoleVO;


public class SystemRoleValidator implements Validator {
	
	@Override
	public boolean supports(Class clazz) {
		return clazz.equals(SystemRoleVO.class);
	}
	public void validate(Object obj, Errors errors) {
		ValidationUtils.rejectIfEmptyOrWhitespace(errors, "roleName", "error.role.required");
	}
}
